new Vue({
    el: '#resume',
    data() {
        return{
            resumeId:2019214378,
            resume: 'aaa',
            age:'',
            message: 'test',
            url_base: 'service_resume/',
            skill:'',
            skillN:0,
            project:'',
            projectN:0,
        }},
    created:function (){
        let that = this
        console.log("suc")
        axios.get('http://localhost:8003/'+this.url_base+"resume/findMyResume/"+this.resumeId).then(res => {
            console.log(res)
            that.resume=res.data.data.resume
            d=new Date()
            let nowYear=d.getFullYear();
            console.log(nowYear)
            console.log(that.resume.birth.split("-")[0])
            that.age=nowYear-parseInt(that.resume.birth.split("-")[0])
            console.log(that.age)
        })
            , axios.get('http://localhost:8003/'+this.url_base+"stu-skill/findMySkill/"+this.resumeId).then(res => {
            that.skill=res.data.data.skill
        }),
            axios.get('http://localhost:8003/'+this.url_base+"stu-project/findMyProject/"+this.resumeId).then(res => {
                console.log(res)
                that.project=res.data.data.project
            })
    },
    methods: {

        reverseMessage: function () {
            this.message = this.message.split('').reverse().join('')
        },
        save:function (){
            let that=this
            console.log(that.resume)
            axios.post(this.url_base+'save',this.resume).then(res=>
            {
                if(res){
                    alert("保存成功")}
                else{
                    alert("保存失败")}
            })
        }

    },

})